package com.my.blogs.personblog.Service.ServiceImpl;

import com.my.blogs.personblog.Service.RootService;
import com.my.blogs.personblog.enity.Root;
import com.my.blogs.personblog.enity.User;
import com.my.blogs.personblog.enity.information;
import com.my.blogs.personblog.mapper.RootMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RootServiceImpl implements RootService {
    @Autowired
    private RootMapper rootMapper;
    @Override
    public List<Root> selectAllUsers() {
        return rootMapper.selectAllUsers();
    }

    @Override
    public Root selectUserById(int id) {
        return rootMapper.selectUserById(id);
    }

    @Override
    public Root selectUserByUsername(String username) {
        return rootMapper.selectUserByUsername(username);
    }

    @Override
    public Root selectUserByEmail(String email) {
        return rootMapper.selectUserByEmail(email);
    }

    @Override
    public Root selectUserByPhone(String phone) {
        return rootMapper.selectUserByPhone(phone);
    }

    @Override
    public Boolean insertUser(User user) {
        return rootMapper.insertUser(user);
    }

    @Override
    public Boolean updateUser(User user) {
        return rootMapper.updateUser(user);
    }

    @Override
    public Boolean deleteUser(int id) {
        return rootMapper.deleteUser(id);
    }

    @Override
    public List<Root> sortById(int id) {
        return rootMapper.sortById(id);
    }

    @Override
    public List<Root> selectPage(int page, int pageSize) {
        return rootMapper.selectPage(page, pageSize);
    }

    @Override
    public List<information> selectInformation() {
        return rootMapper.selectInformation();
    }

    @Override
    public information insertInformation(information information) {
        return rootMapper.insertInformation(information);
    }

    @Override
    public Boolean updateInformation(information information) {
        return rootMapper.updateInformation(information);
    }

    @Override
    public Boolean deleteInformation(int id) {
        return rootMapper.deleteInformation(id);
    }
}
